package com.zyfu.mybatis.demo.service.user;

import com.zyfu.mybatis.demo.dao.UserDao;
import com.zyfu.mybatis.demo.entity.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <b>请输入名称</b>
 * <pre>
 * 描述<br/>
 * 作用：；<br/>
 * 限制：；<br/>
 * </pre>
 *
 * @author 张永福
 * @since 2024/2/6 11:14
 */
@Service
public class UserService {
    @Autowired
    UserDao userDao;
    public int add(User user) {
        return userDao.insert(user);
    }

    public void batchAdd(List<User> userlist) {
        userDao.insertBatch(userlist);
//        userDao.insertBatch2(userlist);
        System.out.println(1111);
    }
}
